<?php
echo "<title>特码大单警示</title>\r\n\r\n";
if ( !defined( "IN_OP" ) )
{
    exit( "You can't access this file directly..." );
}
$ui = new UI();
$conf = new Config();
$lotto_id = intval( $_GET['id'] );
$maxbet_hint = intval( $conf->get( "max_bat_hint" ) );
$sound_mode = intval( $conf->get( "alert_sound" ) );
$hint_mode = 0;
if ( 0 < $maxbet_hint )
{
    $chktimer = systime( ) - 28;
    $sql = "select * from bet where lotto_id=".$lotto_id." and bettype in (0,24) and (amount*upercent/100)>=".$maxbet_hint." and createtime>=".$chktimer." and rame=0 order by createtime desc, bettype, numbers";
    $rs = getdb( $sql );
    $movenext = !$rs->eof;
    if ( $movenext )
    {
        echo "<bgsound src='image/dindin".$sound_mode.".mp3' loop=1 />";
        echo "<script>";
        echo "setTimeout(\"window.close()\",3000);";
        echo "</script>";
    }
    else
    {
        echo "<script>";
        echo "window.close();";
        echo "</script>";
    }
}
else
{
    echo "<script>";
    echo "window.close();";
    echo "</script>";
}
?>